package com.example.smart_community.controller;

import com.example.smart_community.po.Houseinfo;
import com.example.smart_community.service.HouseinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@CrossOrigin
@RestController
@RequestMapping("/houseinfo")
public class HouseinfoController {
    @Autowired
    private HouseinfoService houseinfoService;
    @GetMapping("selectByBuild")
    public List<Houseinfo> selectByBuild(Integer build){
        return houseinfoService.selectByBuild(build);
    }
}
